package tianrun.ziguan.api.calculate.config.dao;

import org.apache.ibatis.annotations.Param;
import tianrun.ziguan.api.calculate.config.entity.TCalAsset;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * @author zhaoqi
 */
public interface TCalAssetMapper extends BaseMapper<TCalAsset> {

    List<TCalAsset> queryAssetList(@Param("assetGroupName") String assetGroupName);

    /**
     * 修改组件assetNum
     */
    int updateModulesAssetNum(@Param("assetNum") String assetNum, @Param("tableName")String tableName, @Param("calAssetId")Long calAssetId);
    /**
     * 修改点位assetNum
     */
    int updateCalLabelConfigsAssetNum(@Param("assetNum") String assetNum,@Param("oldAssetNum")String oldAssetNum);
    /**
     * 修改表达式assetNum
     */
    int updateExpressionAssetNum(@Param("assetNum") String assetNum,@Param("oldAssetNum")String oldAssetNum);

    /**
     * 恢复已删除的数据
     * @param id
     * @return
     */
    int undeleteById(Long id);
}
